<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<div class="mainBody">
    <div class="btnArea floatFix">
        <div class="selectorDiv">
            <div class="selectorName fontDinpro">OS</div>
            <div class="locationGroup listGroupDown listGroup">
                <a class="btnLeft btnPrimary fontDinpro" data-toggle="dropdown" href="javascript:void(0)" link="">
                    <?php
                    switch($cur_os){
                        case 0:
                            echo "All";
                            break;
                        default:
                            echo $os[$cur_os];
                    }
                    ?>
                </a>
                <a class="btnRight btnPrimary" data-toggle="dropdown" href="javascript:void(0)"><span class="caretBottom"></span></a>
                <ul class="dropDownList fontDinpro">
                    <li>
                        <a href="javascript:void(0)" class="fontDinpro" link="<?php echo backend_url($language.'/app/view/os'); ?>/0">
                            All
                        </a>
                    </li>
                    <?php foreach($os as $k=>$r): ?>
                        <li>
                            <a href="javascript:void(0)" class="fontDinpro" link="<?php echo backend_url($language.'/app/view/os'); ?>/<?php echo $k; ?>">
                                <?php echo $r; ?>
                            </a>
                        </li>
                    <?php endforeach; ?>
                </ul>
            </div>
        </div>
    </div>
    <div class="tableContent">
        <table class="fontDinpro">
            <thead>
            <tr>
                <th style="width: 80px;">Icon</th>
                <th style="width: 100px;">AppID</th>
                <th>Name</th>
                <th style="width: 100px;">Version</th>
                <th style="width: 350px;">Options</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td style="width: 80px;">Icon</td>
                <td style="width: 100px;">AppID</td>
                <td>Name</td>
                <td style="width: 100px;">Version</td>
                <td style="width: 350px;">Options</td>
            </tr>
            <?php foreach($list as $v) : ?>
                <tr>
                    <td>
                        <img src="<?php echo $v['icon']==''?'img/common/defaultIcon.png':$this->config->item('res_domain').$v['icon']; ?>" alt="icon" class="icon"/>
                    </td>
                    <td><?php echo $v['app_id']; ?></td>
                    <td><?php echo $v['name']; ?></td>

                    <td><?php echo $v['ver']; ?></td>
                    <td>
	                    <button class="tableBtn" onclick="location.href='<?php echo backend_url('app/upload/'.$v['app_id']); ?>'">
	                    	<div class="editIcon"></div>上传包
	                	</button>
	                    <button class="tableBtn" onclick="location.href='<?php echo backend_url('app/chcode_list/'.$v['app_id']).'/'.$cur_os; ?>'">
	                    	<div class="editIcon"></div>设置渠道
	                	</button>
	                    <button class="tableBtn" onclick="location.href='<?php echo backend_url('app/old_apk/'.$v['app_id']).'/'.$cur_os; ?>'">
	                    	<div class="editIcon"></div>原始游戏包
	                	</button>
                    </td>
                </tr>
            <?php endforeach; ?>
            <tr style="height: 33px;"></tr>
            </tbody>
        </table>
    </div>
    <?php if(!empty($pagination)){?><div class="changePage"><?php echo $pagination; ?></div> <?php } ?>
</div>
